#pragma once
#include "GameController.h"
#include "ActionChecker.h"
#include "Effect.h"
#include "Effect_Ray.h"
#include "Effect_Sphere.h"
#include "Effect_Spread.h"
#include "Effect_Guard.h"
#include "Effect_HitRay.h"
#include "Effect_DisplayDamage.h"
#include <vector>
using namespace std;

class EffectController
{
public:
	EffectController(GameController * const gController) : _GameController(gController) {};
	~EffectController(void) {};

	void CalcEffects(DepthGenerator &depth);
	void DrawEffects();
	void RemoveAllEffect();
	void AddAction(ActionInfo *action);
	void RemoveEffectByUserID(XnUInt32 id);

private:
	void SetEffectInit(ActionInfo& action, Effect **eff);
	ActionInfo* GetHitEffect(ActionInfo& action, XnPoint3D p);
  ActionInfo* GetDamageEffect(ActionInfo& action, XnPoint3D p, float damage);
	bool EffectHitEffect(XnPoint3D center, float radius);
	EffectController(const EffectController&);
	GameController * const _GameController;
	std::vector<ActionInfo*> _actionVec;
};

